package com.mycompany.app.hr.pa.facade;

public interface IPersonnelActionFacade {

    /**
     * create employees’ info, system users’ info, set default password into
     * LDAP and generate leave entitlement for new-hired employees.
     */
    
    /**
     * Trigger condition:
     * If the employee hasn't existed in the system, and the current termination
     * date is null, If the employee is expatriate, the action will be "new
     * hire". If the employee hasn't existed in the system, and the current
     * termination date is null. If the employee is Intern, regular employee,
     * agency temporary or WUXI expatriate, the action will be "new hire".
     */
    
    /**
     * Business Logic:
     * Create employee info, set valid flag=valid Create system
     * user info, set valid flag=valid; not locked; need change password; Create
     * common role for the employee to ensure the employee can access the system
     * with the necessary access right; Set default password and LDAP user info
     * (GID; password) Generate leave entitlement for non-expatriate employees.
     */
    public void hire();

    
    
    
    /**
     * Trigger Conditions:
     *  --If the employee has existed in the system and the
     * employee is not valid, And If the current termination date is null, and
     * the termination date in the system is not null, and the latest hired date
     * in the system isn't the same as current latest hired date, the system
     * will do rehired process; -- If the employee has existed in the system and
     * the employee is valid, and the current termination date is null, and the
     * employee type has changed from expatriates from outside WUXI factory to
     * regular employees or WUXI expatriates, the system will do change employee
     * type process.
     */
    public void rehire();

    
    
    /**
     * Trigger Conditions:
     * If the current inputted termination date is not null,
     * the employee in the system is IN_SERVIDE (VALID), and terminate date >=
     * latest hired date, the termination process will be triggered as resigned.
     * If the current inputted termination date is not null, the employee
     * doesn’t exist in the system, the invalid employee info will be created
     * into employee table; If the current inputted termination date is not
     * null, the employee exists in the system and it’s invalid, the invalid
     * employee info will be updated in the employee table;
     */
    
    
    /**
     * Business Logic on disabling the system users:
     * Invalidating employees
     * Disabling system user Deleting all the user’s roles Deleting LDAP user
     * account
     */
    
    /**
     * GDC-Seagate-UseCaseSpec-Interface.doc
     * 5.6 termination process
     */
    public void resign();

}
